<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<head>

    <title>ffown</title>
    <script type="text/javascript" src="./js/highlighter/scripts/shCore.js"></script>
	<script type="text/javascript" src="./js/highlighter/scripts/shBrushBash.js"></script>
	<script type="text/javascript" src="./js/highlighter/scripts/shBrushCpp.js"></script>
	<script type="text/javascript" src="./js/highlighter/scripts/shBrushCSharp.js"></script>
	<script type="text/javascript" src="./js/highlighter/scripts/shBrushCss.js"></script>
	<script type="text/javascript" src="./js/highlighter/scripts/shBrushDelphi.js"></script>
	<script type="text/javascript" src="./js/highlighter/scripts/shBrushDiff.js"></script>
	<script type="text/javascript" src="./js/highlighter/scripts/shBrushGroovy.js"></script>
	<script type="text/javascript" src="./js/highlighter/scripts/shBrushJava.js"></script>
	<script type="text/javascript" src="./js/highlighter/scripts/shBrushJScript.js"></script>
	<script type="text/javascript" src="./js/highlighter/scripts/shBrushPhp.js"></script>
	<script type="text/javascript" src="./js/highlighter/scripts/shBrushPlain.js"></script>
	<script type="text/javascript" src="./js/highlighter/scripts/shBrushPython.js"></script>
	<script type="text/javascript" src="./js/highlighter/scripts/shBrushRuby.js"></script>
	<script type="text/javascript" src="./js/highlighter/scripts/shBrushScala.js"></script>
	<script type="text/javascript" src="./js/highlighter/scripts/shBrushSql.js"></script>
	<script type="text/javascript" src="./js/highlighter/scripts/shBrushVb.js"></script>
	<script type="text/javascript" src="./js/highlighter/scripts/shBrushXml.js"></script>
	<link type="text/css" rel="stylesheet" href="./js/highlighter/styles/shCore.css"/>
	<link type="text/css" rel="stylesheet" href="./js/highlighter/styles/shThemeDefault.css"/>
	<script type="text/javascript">
		SyntaxHighlighter.config.clipboardSwf = './js/highlighter/scripts/clipboard.swf';
		SyntaxHighlighter.all();
	</script>

    <link href="./js/lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
    <script src="./js/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script> 
    <script src="./js/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
    <script src="./js/lib/ligerUI/js/plugins/ligerTextBox.js" type="text/javascript"></script>
    <script src="./js/lib/ligerUI/js/plugins/ligerLayout.js" type="text/javascript"></script>
    <script src="./js/lib/ligerUI/js/plugins/ligerTree.js" type="text/javascript"></script>
    <script src="./js/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
    <script src="./js/lib/ligerUI/js/plugins/ligerTab.js" type="text/javascript"></script>
    <script src="./js/lib/ligerUI/js/plugins/ligerDrag.js" type="text/javascript"></script>
    <script src="./js/lib/ligerUI/js/plugins/ligerMenu.js" type="text/javascript"></script>

    <script type="text/javascript">
        var tab = null;
        var accordion = null;
        var tree = null;
        $(function ()
        {
            //go();
            var menu;
            var actionNodeID;
            function itemclick(item, i)
            {
                alert(actionNodeID + " | " + item.text);
            }
            menu = $.ligerMenu({ top: 100, left: 100, width: 120, items:
            [
            { text: '增加', click: itemclick, icon: 'add' },
            { text: '修改', click: itemclick },
            { line: true },
            { text: '查看', click: itemclick }
            ]
            });

            $("#layout1").ligerLayout({ leftWidth: 200});
            $("#navtab1").ligerTab({ dblClickToClose: false});
            $("#tree").ligerTree({ checkbox: false, onContextmenu: function (node, e)
            {
                actionNodeID = node.data.text;
                menu.show({ top: e.pageY, right: e.pageX });
                return false;
            }
            });
        });
    </script>
    
    <style type="text/css"> 
        body{ padding:5px; margin:0; padding-bottom:15px;}
        #layout1{  width:100%;margin:0; padding:0;  }  
    	.l-page-top{ height:50px; background:#ffffff; margin-bottom:1px;}
    	h4{ margin:20px;}
    	#f_div{
            left:100px;
            top:10;
            position:absolute;
            z-index:4;
        }
    </style>
</head>

<body>  
        <div class="l-page-top"> <img src="./images/logo.jpg"  height="50px"/> </div>
        <div id="layout1">
        <div position="left" title="浏览器">
             <!--简易模式-->
            <div style="width:200px; height:300px; margin:10px; float:left;  border:0px solid #ccc; overflow:auto;  ">
            <ul id="tree">
                <li>
                    <span>/</span>
                    <ul>
                        <li url='null.htm'>
                            <span>home</span>
                             <ul>
                                <li><span>bashrc</span></li>
                                <li><span>test.txt</span></li>
                             </ul>
                         </li>
                         <li url='null.htm'>
                            <span>etc</span>
                             <ul>
                                <li><span>config</span></li>
                             </ul>
                         </li>
                    </ul>
                </li> 
            </ul>
        </div>
        </div>
        
        <div position="center" title="opened files">
            <div id="navtab1" style="width: 100%;overflow:hidden; border:1px solid #A3C0E8; ">
                
                <div  title="我的主页1" showClose="true">
                    <!-- !-->
                    
                    
                </div>
                <div  title="我的主页2" showClose="true">
                    <div id="maingrid2" style="margin:10px; height:300px;">我的主页2</div>
                </div>
            </div>
        </div>  
    </div> 

<div id="f_div">
<iframe  id="ffframe" name="ffframe" frameborder=0  scrolling="auto" width="800px" height="600">xxx</iframe>
</div>
</body>
</html>

<SCRIPT language="javascript" defer=true>

var editor =  document.getElementById("ffframe").contentWindow;//contentWindow后面不能加上document，会出错

editor.document.designMode = 'On';
editor.document.contentEditable = true;
editor.document.open();
editor.document.writeln('<html><body><pre class="brush: cpp;"> void foo(){} </pre></body></html>');
editor.document.close(); 
editor.focus();

if(document.selection){
    var range = editor.document.selection.createRange();
    range.pasteHTML('abc');
}
else{
    editor.document.designMode = 'On'; // Moz, Op, Saf 
    editor.document.execCommand('g');
}
 
</script>